package com.qf.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.entity.SysOrder;
import com.qf.entity.SysOrderDTO;
import com.qf.entity.SysOrderVO;
import com.qf.service.SysOrderService;
import com.qf.util.R;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * --- 冲 ---
 *
 * @author Biggen
 * @date 2025/4/27
 * @desc
 */
@RestController
@CrossOrigin
@RequestMapping("/zf2")
public class SysOrderPageController {
    private Logger logger = LogManager.getLogger(SysOrderPageController.class);

    @Autowired
    private SysOrderService service;

    @GetMapping("/sys/order/queryAllPage")
    public R queryAllSysOrderPage(SysOrderDTO sysOrderDTO){
        PageHelper.startPage(sysOrderDTO.getPageNum(),sysOrderDTO.getPageSize());
        List<SysOrderVO> list = service.queryAllSysOrderPage(sysOrderDTO);
        PageInfo<SysOrderVO> pageInfo = new PageInfo<>(list);
        return R.ok(pageInfo);
    }
}















